<?php
/**
 * 学校名検索用SQL作成クラス<br />
 *
 * @package apamanshop
 * @author SS鈴木
 * @copyright
 */
class Rstobi_Model_GakkonameSearch extends Rstobi_Model_Base
{
    /**
     * 学校名検索用From・Where句取得
     *
	 * @access	public
	 * @return  string
     */
	public function getFromWhereForGakkonamesearch($params ,&$db_params)
	{
		$sql = "";
		$sql .=" FROM";
		$sql .="     T03WEB_HEYA T03";
		$sql .="     ,SCHOOL_USER.T68STUDENT_HEYA ";
		$sql .=" WHERE";
		$sql .="     T03.T03_ORIGINAL_HEYA_CD01 = T68_ORIGINAL_HEYA_CD01";
		$sql .="     AND T03.T03_TENPO_CD = T68_TENPO_CD";
		$sql .="     AND T68_SCH_CD = '".$params['sch_cd']."'";

		return $sql;
	}

    /**
     * 学校名検索用From句取得
     *
	 * @access	public
	 * @return  string
     */
	public function getFromForGakkonamesearch($params ,&$db_params)
	{
		$sql = "";
		$sql .=" FROM";
		$sql .="     T03WEB_HEYA T03";
		$sql .="     ,SCHOOL_USER.T68STUDENT_HEYA ";

		return $sql;
	}

    /**
     * 学校名検索用Where句取得
     *
	 * @access	public
	 * @return  string
     */
	public function getWhereForGakkonamesearch($params ,&$db_params)
	{
		$sql = "";
		$sql .=" WHERE";
		$sql .="     T03.T03_ORIGINAL_HEYA_CD01 = T68_ORIGINAL_HEYA_CD01";
		$sql .="     AND T03.T03_TENPO_CD = T68_TENPO_CD";
		$sql .="     AND T68_SCH_CD = '".$params['sch_cd']."'";

		return $sql;
	}

}
?>